package cn.smbms.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.smbms.dao.UserMapper;
import cn.smbms.pojo.User;
import cn.smbms.service.UserService;
@Service("userService")
@Transactional
public class UserServiceImpl implements UserService{
	@Autowired
	private UserMapper userMapper;
	public User tofindByUsercode(User user) {
		
		return userMapper.findByUsercode(user);
	}

	public int toaddUser(User user) {
		
		return userMapper.addUser(user);
	}

	public User tofindUserByUserCode(String userCode) {
		
		return userMapper.getUserByUserCode(userCode);
	}

	public User tofingUserByUserId(Integer id) {
	
		return userMapper.getUserByUserId(id);
	}

	public List<User> tofindListUser() {
		
		return userMapper.getListUser();
	}

	public int toupdateUserByid(User user) {
		
		return userMapper.updateUserByid(user);
	}

	public int finddeleteUid(Integer uid) {
		return userMapper.getDeleteUid(uid);
	}

	public User findqueryUid(Integer uid) {
		return userMapper.getqueryUid(uid);
	}
}
